/**
 * Generate time : 2011-11-25 10:32:27
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.zm.cm.domain;

import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;

/**
 * ZMCMPlanTypeRelation
 * 
 */
public class ZMCMPlanTypeRelation extends DaoEPBase {

	private String fdKeyId = " "; /* 主键 */
	private String fdDefaultTypeName = " "; /* 系统默认计划名称 */
	private String fdUserTypeName = " "; /* 用户设置计划名称 */
	private String fdUserTypeName1 = " "; /* 用户设置计划名称1 */
	private String fdUserTypeName2 = " "; /* 用户设置计划名称2 */

	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("fdKeyId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("主键");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdDefaultTypeName");
		eiColumn.setFieldLength(80);
		eiColumn.setDescName("系统默认计划名称");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdUserTypeName");
		eiColumn.setFieldLength(80);
		eiColumn.setDescName("用户设置计划名称");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdUserTypeName1");
		eiColumn.setFieldLength(80);
		eiColumn.setDescName("用户设置计划名称1");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdUserTypeName2");
		eiColumn.setFieldLength(80);
		eiColumn.setDescName("用户设置计划名称2");
		eiMetadata.addMeta(eiColumn);

	}

	/**
	 * the constructor
	 */
	public ZMCMPlanTypeRelation() {
		initMetaData();
	}

	/**
	 * get the fdKeyId - 主键
	 * 
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}

	/**
	 * set the fdKeyId - 主键
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}

	/**
	 * get the fdDefaultTypeName - 系统默认计划名称
	 * 
	 * @return the fdDefaultTypeName
	 */
	public String getFdDefaultTypeName() {
		return this.fdDefaultTypeName;
	}

	/**
	 * set the fdDefaultTypeName - 系统默认计划名称
	 */
	public void setFdDefaultTypeName(String fdDefaultTypeName) {
		this.fdDefaultTypeName = fdDefaultTypeName;
	}

	/**
	 * get the fdUserTypeName - 用户设置计划名称
	 * 
	 * @return the fdUserTypeName
	 */
	public String getFdUserTypeName() {
		return this.fdUserTypeName;
	}

	/**
	 * set the fdUserTypeName - 用户设置计划名称
	 */
	public void setFdUserTypeName(String fdUserTypeName) {
		this.fdUserTypeName = fdUserTypeName;
	}

	/**
	 * get the fdUserTypeName1 - 用户设置计划名称1
	 * 
	 * @return the fdUserTypeName1
	 */
	public String getFdUserTypeName1() {
		return this.fdUserTypeName1;
	}

	/**
	 * set the fdUserTypeName1 - 用户设置计划名称1
	 */
	public void setFdUserTypeName1(String fdUserTypeName1) {
		this.fdUserTypeName1 = fdUserTypeName1;
	}

	/**
	 * get the fdUserTypeName2 - 用户设置计划名称2
	 * 
	 * @return the fdUserTypeName2
	 */
	public String getFdUserTypeName2() {
		return this.fdUserTypeName2;
	}

	/**
	 * set the fdUserTypeName2 - 用户设置计划名称2
	 */
	public void setFdUserTypeName2(String fdUserTypeName2) {
		this.fdUserTypeName2 = fdUserTypeName2;
	}

	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdDefaultTypeName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdDefaultTypeName")), fdDefaultTypeName));
		setFdUserTypeName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdUserTypeName")), fdUserTypeName));
		setFdUserTypeName1(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdUserTypeName1")), fdUserTypeName1));
		setFdUserTypeName2(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdUserTypeName2")), fdUserTypeName2));
	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("fdKeyId", StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));
		map.put("fdDefaultTypeName", StringUtils.toString(fdDefaultTypeName, eiMetadata.getMeta("fdDefaultTypeName")));
		map.put("fdUserTypeName", StringUtils.toString(fdUserTypeName, eiMetadata.getMeta("fdUserTypeName")));
		map.put("fdUserTypeName1", StringUtils.toString(fdUserTypeName1, eiMetadata.getMeta("fdUserTypeName1")));
		map.put("fdUserTypeName2", StringUtils.toString(fdUserTypeName2, eiMetadata.getMeta("fdUserTypeName2")));

		return map;

	}
}